#ifndef PUNCT_STREAM_H_
#define PUNCT_STREAM_H_

#include<iostream>
#include<string.h>
#include<iomanip>
#include<vector>
#include<sstream>
#include<algorithm>

using namespace std;

class Punct_stream
{
 private:
  istream& source;
  istringstream buffer;
  string white;  //the set regarded as whitespace
  bool sensitive;  //whether the stream is sensitive to uppercase and lowercase
  
 public:
  Punct_stream(istream& is):source{is},sensitive{true}{}
  void whitespace(const string& s){white=s;}
  void add_white(char c){white+=c;}
  bool is_whitespace(char c);
  void case_sensitive(bool b){sensitive=b;}
  bool is_case_sensitive(){return sensitive;}
  operator bool();
  Punct_stream& operator>>(string& s);
};

#endif
